#!/bin/bash

timesLeft=3
interval=4

while getopts "t:i:" opt; do
  case $opt in
    t)
      echo "this is -a the arg is ! $OPTARG" 
      timesLeft=$OPTARG
      ;;
    i)
      echo "this is -a the arg is ! $OPTARG" 
      interval=$OPTARG
      ;;

    \?)
      echo "Invalid option: -$OPTARG" 
      ;;
  esac
done

echo $timesLeft
echo $interval

#./opts001.sh -i 87 -t 53
